#pragma once
#include "mytypes.h"
#include "RigidBody.h"
#include "CircleView.h"
#include "Dynamics.h"
#include "RigidCollision.h"

namespace poly
{
	class RigidPoly;
	class RigidCircle : public IDynamic, public IRigidCollider
	{
	public:
		RigidCircle();
		RigidCircle( D3DDevice, RigidBody const &,
			uint32 segments, float radius, float4 const & color );

		void setup( D3DDevice, RigidBody const &,
			uint32 segments, float radius, float4 const & color );

		// IDynamic overrides
		virtual void step( float dt );
		virtual void render( float dt );

		// IRigidCollider override
		virtual void collide( IRigidCollider * );
		void collide( RigidCircle * );
		void collide( RigidPoly * );

	public:
		RigidBody	rigidBody;
		float		radius;
	private:
		CircleView	m_view;
	};
}
